package edu.kit.csl.cratylus.extraction;

import java.util.List;

import edu.kit.csl.cratylus.datatypes.Candidate;
import edu.kit.csl.cratylus.datatypes.Word;

/**
 * The merger finds a representative phoneme sequence for a set of candidates
 * given by the splitter. It is therefore among planner, splitter, and updater
 * one of the major logical modules of cratylus. The found representative is
 * then used as new vocabulary entry in the target language and given to the
 * corpus updater to modify the corpus accordingly.<br>
 * By contract, merger do not get empty candidate sets, and they always return
 * a valid representative word
 * 
 * @see Splitter
 * @see CorpusUpdater
 */
public interface Merger {
	
	/**
	 * Find a representative for a set of target word candidates.
	 * 
	 * @param candidates the set of candidates
	 * @return a word representative for all candidates in the given set
	 */
	Word merge(List<Candidate> candidates);
}
